package com.zzw.springboot.controller;

import com.zzw.springboot.common.Result;
import com.zzw.springboot.service.IStudentCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author zzw2000
 * @Date 2022-06-11 08:35:13
 * @Description 学生选课StudentCourse前端控制器
 */
@RestController
@RequestMapping("/studentCourse")
public class StudentCourseController {
    @Autowired
    private IStudentCourseService studentCourseService;

    /**
     * 查询学生已选的课
     * @param id
     * @return
     */
    @GetMapping("/stuCourse/{id}")
    public Result stuCourse(@PathVariable Integer id){
        return Result.success(studentCourseService.stuCourse(id));
    }
}

